<?php
class Applicant extends CI_Model
{
    function get_Detail($id)
    {

        $this->db->where('id',$id);
        $query=$this->db->get("applicant");
        return $query->row_array();

    }
    function get_Result($id)
    {
         $query = $this->db->query("SELECT
                                    applicant.Id,
                                    applicant.FirstName,
                                    applicant.LastName,
                                    applicant.Gender,
                                    applicant.PermAdd,
                                    applicant.PresAdd,
                                    applicant.Email,
                                    applicant.Birthday,
                                    applicant.AlreadyCustomer,
                                    newconnection.result,
                                    newconnection.cause
                                    FROM
                                    applicant
                                    Inner Join newconnection ON newconnection.appid = applicant.Id
                                    WHERE
                                    applicant.Id =  '$id'");
        return $query->row_array();
    }

}
?>
